home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 34.zip / BS1 part 34 / Cando v1.01 NTSC.adf / NewCommands < prev    next >
Text File  |  1989-12-10  |  10KB  |  332 lines

  1. The CanDo How To Book, Version 1.0: 
  2.  
  3. INOVAtronics, Inc.
  4. 8499 Greenville Ave. Suite 209B
  5. Dallas, TX 75231
  6. USA
  7. Phone: (214) 340-4991
  8. BBS: (214) 357-8511
  9.  
  10.  
  11. ==================================================
  12. Additional Commands (not documented in the manual)
  13. ==================================================
  14.  
  15. The following commands are not documented in the CanDo manual.  Some of
  16. them can be very helpful in designing your CanDo applications so please
  17. review them.
  18.  
  19. -----------------------------------------------------------------------
  20.  
  21. "string"    =    AskForFileName ("filespec" {,"WindowTitle" {,x {,y} } } )
  22.  
  23.         This Function brings up CanDo's file requester.
  24.         It allows your application to ask for a file
  25.         name from the user.  The "filespec" allows you
  26.         to specify the default file specification shown
  27.         in the file requester.  The remaining parameters
  28.         are optional.  "WindowTitle" lets you specify
  29.         the message appearing on the File Requester's
  30.         Window Title.  The x,y parameters allow you to
  31.         specify the initial horizontal and vertical location.
  32.         The    returned "string" indicates the file specified
  33.         by the user.  It will be "" (NULL) if they
  34.         selected CANCEL.
  35.  
  36. -----------------------------------------------------------------------
  37.  
  38.         AreaCopy <StartX>, <StartY>, <Width>, <Height>,
  39.             <DestinationX>, <DestinationY>
  40.  
  41.         The AreaCopy Command copies an area of the
  42.         window.  The StartX and StartY specify the
  43.         upper left corner of the area to copy.  The
  44.         Width and Height specify the size of the area
  45.         in pixels.  The DestinationX and DestinationY
  46.         indicate the upper left corner of the area to
  47.         copy to.
  48.  
  49. -----------------------------------------------------------------------
  50.  
  51.         AreaPolygon <X1>, <Y1>, <X2>, <Y2>, <X3>, <Y3> {,<X4>, <Y4>
  52.             {,<X5>, <Y5> {,<X6>, <Y6>}}}
  53.  
  54.         The AreaPolygon allows you to draw a solid
  55.         Polygon with 3 to 6 vertices.  It uses the
  56.         color in PenA.  the parameters are the X,Y
  57.         locations for the Polygon.  The first six
  58.         values, designating 3 verticies, are required.
  59.         An additional 3 verticies can be specified.
  60.  
  61. -----------------------------------------------------------------------
  62.  
  63.         AreaScroll <StartX>, <StartY>, <Width>, <Height>, <DeltaX>,
  64.             <DeltaY>
  65.  
  66.         The AreaScroll Command scrolls an area of the
  67.         window.  The StartX, StartY, Width, and Height
  68.         define the area to be scrolled.  The DeltaX
  69.         and DeltaY indicate the number of Pixels to
  70.         scroll.
  71.  
  72.         Example:
  73.         Let Cnt = 100           ; Scroll 100 Times
  74.         While Cnt > 0
  75.             Let Cnt = Cnt - 1  ; Decrement Cnt for Loop
  76.             AreaScroll 0,0,320,200,4,2 ; Scroll entire window
  77.         EndLoop
  78.  
  79. -----------------------------------------------------------------------
  80.  
  81.         Dispose VarName
  82.  
  83.         Dispose removes the specified variable.  By
  84.         removing the variable its current contents are
  85.         lost and it will perform as though it had never
  86.         been created.
  87.  
  88. -----------------------------------------------------------------------
  89.  
  90.         DisposeAll
  91.  
  92.         Disposes all variables.  The contents of all
  93.         variables are lost.
  94.  
  95. -----------------------------------------------------------------------
  96.  
  97.         DoOnError "RoutineName" {,Arg1,...,Arg10}
  98.  
  99.         The DoOnError Command performs the specified
  100.         "RoutineName" if an error occurs in the script
  101.         being performed.  This will supersede the error
  102.         handling done by CanDo.  This means CanDo will
  103.         not detect the error and it will not bring up
  104.         the error script.
  105.  
  106. -----------------------------------------------------------------------
  107.  
  108.         DrawPolygon <X1>, <Y1>, <X2>, <Y2>, <X3>, <Y3> {,<X4>, <Y4> 
  109.             {,<X5>, <Y5> {,X6, Y6}}}
  110.  
  111.         The AreaPolygon allows you to draw a Polygon
  112.         with 3 to 6 verticies.  The Polygon is drawn
  113.         with lines using PenA.  the parameters are the
  114.         X,Y locations for the Polygon.  The first six
  115.         values, designating 3 verticies, are required.
  116.         An additional 3 verticies can be specified.
  117.  
  118. -----------------------------------------------------------------------
  119.  
  120. <integer>   =    ErrorLineNumber
  121.  
  122.         The ErrorLineNumber variable returns the line
  123.         number, in the script, that caused an error.
  124.         This number can be used by the "RoutineName"
  125.         used in a DoOnError.
  126.  
  127. -----------------------------------------------------------------------
  128.  
  129. "string"    =    ErrorScriptType
  130.  
  131.         It returns the script type where an error
  132.         occurred.
  133.  
  134. -----------------------------------------------------------------------
  135.  
  136. "string"    =    ErrorSourceLine
  137.  
  138.         It returns the source line of the line the
  139.         error occurred on.
  140.  
  141. -----------------------------------------------------------------------
  142.  
  143. "string"    =    ErrorSourceName
  144.  
  145.         It returns the Name of the Object, Routine, or
  146.         the Card in the case of StartupScripts errors,
  147.         where the error occurred.
  148.  
  149. -----------------------------------------------------------------------
  150.  
  151. "string"    =    ErrorSourceType
  152.  
  153.         It returns "Object", "Routine", or the "Card"
  154.         in the case of StartupScript errors, where the
  155.         error occurred.
  156.  
  157. -----------------------------------------------------------------------
  158.  
  159. "string"    =    ErrorText
  160.  
  161.         It returns the error message for the error that
  162.         occurred.
  163.  
  164. -----------------------------------------------------------------------
  165.  
  166. <<logical>> =    Exists ("filename")
  167.  
  168.         It returns a TRUE if the specified filename
  169.         exists.
  170.  
  171. -----------------------------------------------------------------------
  172.  
  173. "string"    =   FileType ("FileName")
  174.  
  175.         This function returns specific information about the
  176.         type of file.  These include:
  177.  
  178.         Directory - The filespec is actually a directory.
  179.         Program - This is a executable program.
  180.         Deck - This is a CanDo Deck.
  181.         Sound - This is an 8SVX IFF sampled sound file.
  182.         Picture - This is a standard IFF picture.
  183.         Brush - This is an IFF "GRAB" or clipped image.
  184.         BrushAnim - This is an IFF Deluxe PaintIII Brush Animation
  185.         Unknown - This file could not be positively identified.
  186.                 This could mean that it is a simple text file.
  187.  
  188.  
  189. -----------------------------------------------------------------------
  190.  
  191.         GetDiskInfo "filespec" , NumberOfBlockVar
  192.             {,NumberUsedVar {,BytesPerBlockVar}}
  193.  
  194.         This Command is used for getting information
  195.         about a Disk Device.  The "filespec" is the
  196.         specification for the device or any file on the
  197.         device.  The remaining parameters must be valid
  198.         variable names where the information is to be
  199.         stored.  NumberOfBlockVar will be set to the
  200.         number of Blocks the device has.  NumberUsedVar
  201.         will be set to the number of Blocks currently
  202.         in use on the device.  BytesPerBlockVar will be
  203.         set to the number of usable bytes per Block.
  204.         Using these values you can calculate additional
  205.         information that you may want to use.
  206.  
  207. -----------------------------------------------------------------------
  208.  
  209.         GetWindowLimits MinX, MinY, MaxX, MaxY
  210.  
  211.         The GetWindowLimits Command returns current
  212.         window limits.  The values will be put into the
  213.         specified variable names.  They can be changed
  214.         using the SetWindowLimits Command.  See the
  215.         SetWindowLimits Command for a description of
  216.         the values.
  217.  
  218. -----------------------------------------------------------------------
  219.  
  220.         IfError...{else}...endif
  221.  
  222.         The IfError Command is used to detect an error
  223.         following a scripting Command.  If the previous
  224.         Command caused an error the IfError Commands
  225.         will supersede CanDo's error handling done by
  226.         CanDo and a DoOnError you might have in the
  227.         script.  This means CanDo will not know about
  228.         the error and the "RoutineName" specified in a
  229.         DoOnError will not be performed.
  230.  
  231. -----------------------------------------------------------------------
  232.  
  233. "string"    =      LibraryVersion
  234.  
  235.         The LibraryVersion System Variable returns the
  236.         string identifing the current CanDo.Library
  237.         being used.
  238.  
  239. -----------------------------------------------------------------------
  240.  
  241.         =   Nothing
  242.  
  243.         The Nothing System Variable is primarily used
  244.         to determining if a variable has a value.
  245.  
  246.         Example:
  247.  
  248.             If TheVariable = Nothing
  249.                 .
  250.                 .
  251.                 .
  252.             EndIf
  253.  
  254.         This comparison will only be TRUE if the
  255.         variable has no value.
  256.  
  257. -----------------------------------------------------------------------
  258.  
  259. <Integer>   =    NumberOfWords ("String" {,Delimiters})
  260.  
  261.         The NumberOfWords Function returns the number
  262.         of seperate words in the specified string.  You
  263.         can optionally specify the character delimiters
  264.         separating the words.
  265.  
  266. -----------------------------------------------------------------------
  267.  
  268. "string"    =    ParentOf ("DirName")
  269.  
  270.         The ParentOf Function returns the directory
  271.         specification of the specified "DirName"
  272.  
  273. -----------------------------------------------------------------------
  274.  
  275. "string"    =    ScreenTitle
  276.  
  277.         It returns the current Screen Title message
  278.  
  279. -----------------------------------------------------------------------
  280.  
  281. <<Logical>> =    SearchFound
  282.  
  283.         The SearchFound System Variable Returns TRUE if
  284.         the most previous SearchFor or Replace Command
  285.         found the specified search string.
  286.  
  287. -----------------------------------------------------------------------
  288.  
  289.         SetAutoFileRequester <<logical expression>>
  290.  
  291.         SetAutoFileRequester enables or disables the
  292.         automatic file requester.  When enabled,
  293.         CanDo's file requester will appear whenever an
  294.         error occurs when reading a file.  While this
  295.         can very useful for avoiding errors, you may
  296.         want to provide your own error handling and not
  297.         have the file requester appear.  However, an
  298.         error will still occur if the user selects
  299.         CANCEL from the automatic file requester.
  300.  
  301. -----------------------------------------------------------------------
  302.  
  303.         SortDocument {SortSwitches {,<StartingColumn>} }
  304.  
  305.         The SortDocument allows you to sort the Current
  306.         WorkWithDocument.  The default sort is Non-Case
  307.         sensitive in Ascending Order starting in Column 1.
  308.         The optional SortSwitches allow you to
  309.         specify NOCASE or CASE, and ASCENDING or
  310.         DESCENDING.  Finally, the optional
  311.         StartingColumn allows you specify a column of 1
  312.         or more.
  313.  
  314.         Examples:
  315.  
  316.         SortDocument              ; uses default settings
  317.         SortDocument NOCASE ASCENDING, 1  ; uses default settings
  318.         SortDocument CASE           ; Case sensitive sort
  319.         SortDocument DESCENDING          ; Descending Order
  320.         SortDocument NOCASE, 5          ; A switch is required
  321.                           ; to specify Column 5
  322.  
  323. -----------------------------------------------------------------------
  324.  
  325. <Integer>   =    TimeLeftOnChannel ( <channel> )
  326.  
  327.         The TimeLeftOnChannel Function returns the
  328.         number of seconds remain for a sound playing on
  329.         the specified channel.
  330.  
  331.  
  332.